
#ifndef CONEARRESTRAINTWIDGET_H
#define CONEARRESTRAINTWIDGET_H

#include <BButton>
#include <BComboBox>
#include <BRealSpinBox>
#include <BCheckBox>
#include <BLineEdit>
#include <BConearRestraint>

using namespace BWE;

class ConearRestraintPanel : public BWidget
{
	BOBJECT(ConearRestraintPanel);
public:
	ConearRestraintPanel(BWidget* parent = 0);
	~ConearRestraintPanel();

protected:
	void slotAssetChanged(BObject* object, const BValue& value);

	void slotPositionAEditFinished(BObject* object, const BValue& value);
	void slotRotateAEditFinished(BObject* object, const BValue& value);
	void slotPositionBEditFinished(BObject* object, const BValue& value);
	void slotRotateBEditFinished(BObject* object, const BValue& value);

	void slotTwistSpanEditFinished(BObject* object, const BValue& value);
	void slotSwingSpanEditFinished(BObject* object, const BValue& value);
	void slotLimitBiasEditFinsihed(BObject* object, const BValue& value);
	void slotLinearLimitEditFinished(BObject* object, const BValue& value);
	void slotAngularLimitEditFinished(BObject* object, const BValue& value);
	void slotMotorEnabledToggled(BObject* object, const BValue& value);
	void slotTargetVelocityEditFinished(BObject* object, const BValue& value);
	void slotMaxImpulseEditFinished(BObject* object, const BValue& value);

private:
	BConearRestraint*		_conearRestraint;

	BGroupBox*				_bodyAGroupBox;
	BLineEdit*				_positionAEdit;
	BLineEdit*				_rotateAEdit;
	BGroupBox*				_bodyBGroupBox;
	BLineEdit*				_positionBEdit;
	BLineEdit*				_rotateBEdit;

	BRealSpinBox*			_twistSpanSpinBox;
	BRealSpinBox*			_swingSpan1SpinBox;
	BRealSpinBox*			_swingSpan2SpinBox;
	BRealSpinBox*			_biasFactorSpinBox;
	BRealSpinBox*			_linearMinSpinBox;
	BRealSpinBox*			_linearMaxSpinBox;
	BRealSpinBox*			_angularMinSpinBox;
	BRealSpinBox*			_angularMaxSpinBox;
	BGroupBox*				_motorGroupBox;
	BRealSpinBox*			_motorVelocitySpinBox;
	BRealSpinBox*			_maxImpulseSpinBox;

};

#endif
